<template>
	<view class="outBox">
		<view class="userInfo" :style="{
			paddingTop: menuHeight + 'px'
		}">
			<image class="bg" src="../../static/mine/img1.png" mode="scaleToFill"></image>
			<view class="cont">
				<view class="left">
					<view class="name">
						{{userInfo.nickName || '未设置'}}
					</view>
					<view class="tip">
						<view class="tag">
							会员
						</view>
						<view class="number">
							ID:123123
						</view>
					</view>
				</view>
				<view class="right">
					<view class="userImg">
						<image src="https://wx.qlogo.cn/mmhead/jJtbwFuzNwDMZEyZsbZl5Yyn2s9hN46fjq9ANsQ9mT72BAuPLjwWyT4TqCJDq0pPsl4wS7PIialg/0" mode="widthFix"></image>
					</view>
				</view>
			</view>
		</view>
		<view class="content">
			<view class="item" @click="getnav('/pages/mine/infomation')">
				<view class="left">
					<view class="icon">
						<image src="../../static/mine/img2.png" mode="widthFix"></image>
					</view>
					<text>个人信息维护</text>
				</view>
				<view class="right">
					<image src="../../static/mine/Right.png" mode="widthFix"></image>
				</view>

			</view>
			<view class="item" @click="getnav('/pages/distribution/index')">
				<view class="left">
					<view class="icon">
						<image src="../../static/mine/img3.png" mode="widthFix"></image>
					</view>
					<text>分销中心</text>
				</view>
				<view class="right">
					<image src="../../static/mine/Right.png" mode="widthFix"></image>
				</view>

			</view>

			<view class="item" @click="getnav('/pages/mine/storingWine')">
				<view class="left">
					<view class="icon">
						<image src="../../static/mine/img4.png" mode="widthFix"></image>
					</view>
					<text>我的存酒</text>
				</view>
				<view class="right">
					<image src="../../static/mine/Right.png" mode="widthFix"></image>
				</view>

			</view>

			<view class="item" @click="getnav('/pages/mine/message')">
				<view class="left">
					<view class="icon">
						<image src="../../static/mine/img5.png" mode="widthFix"></image>
					</view>
					<text>消息通知</text>
				</view>
				<view class="right">
					<image src="../../static/mine/Right.png" mode="widthFix"></image>
				</view>

			</view>

			<view class="item"  @click="getnav('/pages/reservation/mine')">
				<view class="left">
					<view class="icon">
						<image src="../../static/mine/img6.png" mode="widthFix"></image>
					</view>
					<text>我的预约</text>
				</view>
				<view class="right">
					<image src="../../static/mine/Right.png" mode="widthFix"></image>
				</view>
			</view>
			<view class="item" @click="getnav('/pages/complaints/index')">
				<view class="left">
					<view class="icon">
						<image src="../../static/mine/img7.png" mode="widthFix"></image>
					</view>
					<text>投诉</text>
				</view>
				<view class="right">
					<image src="../../static/mine/Right.png" mode="widthFix"></image>
				</view>
			</view>
			<view class="item" @click="getnav('/pages/order/list')">
				<view class="left">
					<view class="icon">
						<image src="../../static/mine/img7.png" mode="widthFix"></image>
					</view>
					<text>商品列表</text>
				</view>
				<view class="right">
					<image src="../../static/mine/Right.png" mode="widthFix"></image>
				</view>
			</view>
		</view>
		<Tabbar :currentTab="3"></Tabbar>
	</view>
</template>

<script>
	import Tabbar from '../../components/tabbar.vue';
	import Header from '../../components/header.vue';
	import {
		getWXStatusHeight
	} from '@/utils/index.js'

	export default {
		components: {
			Header,
			Tabbar,
		},
		data() {
			return {
				barHeight: 0, // 状态栏高度
				menuHeight: 0, // 状态栏高度
				userInfo:{}, // 用户信息
				baseImgUrl: this.$baseImgUrl
			}
		},

		onLoad(option) {
			let obj = getWXStatusHeight()
			this.barHeight = obj.barHeight
			this.menuHeight = obj.menuHeight

			if(uni.getStorageSync("userInfo")){
				this.userInfo = uni.getStorageSync("userInfo")
			}

		},
		methods: {

		}
	}
</script>

<style lang="scss" scoped>
	.content {
		background-color: #212021;
		padding: 32rpx 24rpx;
		border-radius: 30rpx;
		margin: 0 40rpx;

		.item {
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding-bottom: 36rpx;
			border-bottom: 1px solid #272627;

			&:last-child {
				padding: 0;
				border: none;
			}

			.left {
				display: flex;
				align-items: center;

				.icon {
					margin-right: 20rpx;

					image {
						width: 88rpx;
					}
				}

				text {
					color: #eeeeee;
				}
			}

			.right {
				image {
					width: 24rpx;
					font-size: 30rpx;
				}
			}
		}
	}

	.userInfo {
		width: 100%;
		height: 460rpx;
		position: relative;

		.bg {
			width: 100%;
			height: 100%;
			position: absolute;
			top: 0;
			left: 0;
		}

		.cont {
			position: relative;
			z-index: 1;
			display: flex;
			justify-content: space-between;
			margin-top: 54rpx;
			padding: 0 48rpx;

			.right {
				.userImg {
					width: 132rpx;
					height: 132rpx;
					border-radius: 94rpx 94rpx 94rpx 94rpx;
					border: 2rpx solid #FFFFFF;
					image{
						width: 100%;
						border-radius: 50%;
					}
				}
			}

			.left {
				.name {
					color: #0A0A0A;
					font-weight: 500;
					font-size: 48rpx;
					margin-bottom: 16rpx;
				}

				.tip {
					display: flex;

					.number {
						font-size: 24rpx;
					}

					.tag {
						display: flex;
						align-items: center;
						justify-content: center;
						margin-right: 16rpx;
						width: 68rpx;
						height: 34rpx;
						background-color: #fff;
						border-radius: 8rpx;
						font-size: 22rpx;
					}
				}
			}
		}
	}

	.outBox {
		background-color: #0e0f0d;
		min-height: 100vh;
		padding-bottom: 200rpx;
	}

	.content {
		padding: 20rpx 40rpx;
		box-sizing: border-box;
	}
</style>
